import React from 'react';
import { Tabs } from 'antd';
import EditableTabs from './_components/EditableTabs';
import ReadonlyTabs from './_components/ReadonlyTabs';

const Index = (props) => {
  const { type } = props;
  return type === 'editable-card' ? <EditableTabs {...props} /> : <ReadonlyTabs {...props} />;
};

Object.keys(Tabs).forEach((item) => {
  if (!['defaultProps', 'propTypes'].includes(item)) {
    Index[item] = Tabs[item];
  }
});
Index.displayName = 'Tabs';
export default Index;
